import { StoreModel } from "./Store";
import { TakeoutModel } from "./Takeout";

interface Order {
    id?: number;
    order_id?: string;
    price: number;
    count: number;
    create_time?: Date;
    finish_time?: Date;
    state?: number;
    note?: string;
    payment_method?: number;
    user: string;
    store: string | StoreModel;
    address: number;
    takeout: number | TakeoutModel;
}

export class OrderModel implements Order {
    id?: number | undefined;
    order_id?: string | undefined;
    price!: number;
    count!: number;
    create_time?: Date | undefined;
    finish_time?: Date | undefined;
    state?: number | undefined;
    note?: string | undefined;
    payment_method?: number | undefined;
    user!: string;
    store!: string | StoreModel;
    address!: number;
    takeout!: number | TakeoutModel;
}